package com.g1.gzbooksingle.controller;


import com.g1.gzbooksingle.common.Result;
import com.g1.gzbooksingle.model.DgAccountInfo;
import com.g1.gzbooksingle.model.DgBookInfo;
import com.g1.gzbooksingle.service.IDgAccountInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 支付账户表 前端控制器
 * </p>
 *
 * @author admin
 * @since 2021-10-12
 */
@Slf4j
@Api(tags = "支付账户接口")
@RestController
@RequestMapping("/gzbooksingle/dgAccountInfo")
public class DgAccountInfoController {

    @Autowired
    private IDgAccountInfoService iDgAccountInfoService;

    /**
     * 通过用户id查询账户信息
     * @param userId
     * @return
     */
    @GetMapping("/{userId}")
    @ApiOperation("通过用户id查询账户信息")
    public DgAccountInfo getById(@ApiParam(value = "用户id") @PathVariable Integer userId){
        DgAccountInfo model = iDgAccountInfoService.getByUserId(userId);
        return model;
    }





}
